﻿using System;
using System.Linq;

class QuadraticEquation
{
    static void Main(string[] args)
    {
        Console.Write("Enter a= ");
        int a = int.Parse(Console.ReadLine());
        Console.Write("Enter b= ");
        int b = int.Parse(Console.ReadLine());
        Console.Write("Enter c= ");
        int c = int.Parse(Console.ReadLine());
        int discriminant = (b * b) - 4 * a * c;
        int x1, x2;
        if (discriminant == 0)
        {
            x1 = -b / (2 * a);
            x2 = x1;
            Console.WriteLine("Both solutions are " + x1);
        }
        else if (discriminant < 0)
        {
            Console.WriteLine("There is no solution.");
        }
        else
        {
            x1 = (-b - (int)Math.Sqrt(discriminant)) / (2 * a);
            x2 = (-b + (int)Math.Sqrt(discriminant)) / (2 * a);
            Console.WriteLine("x1={0}, x2={1}", x1, x2);
        }

    }
}

